From: Jasper St. Pierre Date: Fri, 15 Aug 2014 16:43:22 +0000 (-0400) Subject: screenShield: Accept scrolls / swipes either way X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2212 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d445bd17ebfa76c83c11398cd69e7f9b8dfb9e85;p=gnome-shell.git screenShield: Accept scrolls / swipes either way If you turn on natural scrolling, instead of swiping up, you need to swipe down, which is bizarre. Just accept any type of scroll and have them contribute to the delta. https://bugzilla.gnome.org/show_bug.cgi?id=734874 --- diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 0f5d14014..6c1bc5e7a 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -687,10 +687,10 @@ const ScreenShield = new Lang.Class({ return Clutter.EVENT_PROPAGATE; let delta = 0; - if (event.get_scroll_direction() == Clutter.ScrollDirection.UP) + if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH) + delta = Math.abs(event.get_scroll_delta()[0]); + else delta = 5; - else if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH) - delta = Math.max(0, event.get_scroll_delta()[0]); this._lockScreenScrollCounter += delta;